﻿namespace Zinnia.Common.Core
{
    /// <summary>
    /// IO锁接口
    /// </summary>
    internal interface IIoLockService
    {
        /// <summary>
        /// 获取读锁
        /// </summary>
        bool TryEnterReadLock();
        /// <summary>
        /// 释放读锁
        /// </summary>
        void ExitReadLock();
        /// <summary>
        /// 获取写锁
        /// </summary>
        bool TryEnterWriteLock();
        /// <summary>
        /// 释放写锁
        /// </summary>
        void ExitWriteLock();
    }
}
